package com.ss.android.article.browser.main;

import android.content.Context;
import android.support.design.widget.CoordinatorLayout;
import android.util.AttributeSet;
import android.view.View;

public class BrowserGuideView extends CoordinatorLayout {
    private MotionDirectionFrameLayout mMotionDirectionFrameLayout;
    private View mBrowserGuidScrollTopLayout;

    public BrowserGuideView(Context context) {
        super(context);
    }

    public BrowserGuideView(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);
    }

    public BrowserGuideView(Context context, AttributeSet attributeSet, int defaultStyle) {
        super(context, attributeSet, defaultStyle);
    }

    public MotionDirectionFrameLayout getPullRefreshContainer() {
        return this.mMotionDirectionFrameLayout;
    }

    public View getScrollView() {
        return this.mBrowserGuidScrollTopLayout;
    }

    protected void onFinishInflate() {
        super.onFinishInflate();
        this.mBrowserGuidScrollTopLayout = this.findViewById(com.ss.android.article.browser.R.id.browser_guid_scroll_top_layout);
        this.mMotionDirectionFrameLayout = this.findViewById(com.ss.android.article.browser.R.id.feed_area_container);
    }

    public void onLayout(boolean changed, int l, int t, int r, int b) {
        int measuredHeight = this.mBrowserGuidScrollTopLayout.getMeasuredHeight();
        this.mBrowserGuidScrollTopLayout.layout(l, t, r, measuredHeight);
        this.mMotionDirectionFrameLayout.layout(l, measuredHeight, r, b + measuredHeight);
    }
}

